package com.inspur.gs.sbssdl.sbssgl.sbtz.sbtz.front.sbsssbtztreelist_hlp.voactions;

import com.inspur.edp.bef.api.lcp.IStandardLcp;
import com.inspur.edp.bef.core.LcpUtil;
import com.inspur.edp.bff.api.manager.context.QueryContext;
import com.inspur.edp.bff.spi.action.query.BeforeQueryAction;
import com.inspur.edp.cef.entity.condition.EntityFilter;
import com.inspur.edp.cef.entity.condition.ExpressCompareType;
import com.inspur.edp.cef.entity.condition.FilterCondition;
import com.inspur.edp.cef.entity.entity.IEntityData;

import java.util.ArrayList;
import java.util.List;

public class beforeQueryVOAction extends BeforeQueryAction {

/**
 * 构造函数，用于初始化beforeQueryVOAction对象
 * @param context 查询上下文对象，包含查询相关的参数和信息
 */
    public beforeQueryVOAction(QueryContext context) {
        super(context); // 调用父类的构造方法，传入查询上下文对象
    }

    @Override
    public void execute() {

        EntityFilter filter = getQueryContext().getFilter();
        ArrayList<FilterCondition> filterListOrg = filter.getFilterConditions();

        filterListOrg.forEach(i->{
            if(i.getFilterField().equals("sblb_id_lbbh")){
                i.setCompare(ExpressCompareType.LikeStartWith);
            }
        });

    }
}
